/* test_clone_win.cc
* This file is part of ncursesxx library
* Copyright (c) 2003,2004 by Stanislav Ievlev
*
* This file is covered by the GNU Library General Public License,
* which should be included with libncursesxx as the file COPYING.
*/
#include <stdlib.h>
#include <string.h>
#include <curses.h>
#include <unistd.h>
#include <locale.h>


#include <string>

#include <ncurses/application.hh>
#include <ncurses/window.hh>
#include <ncurses/pen.hh>

int
main()
{
	ncurses::application	app;
	ncurses::window	win;
	ncurses::pen	pen(win);

	win.resize(30, 10);
	pen.frame();
	pen.move(1, 1);
	pen.write("write to main window");

	//made clone
	ncurses::window win2;
	win2 = win;

	ncurses::pen pen2(win2);
	pen2.move(1, 2);
	pen2.write("write to clone");

	::wrefresh(::stdscr); //made first screen refresh
	pen.commit();
	::doupdate();

	::wgetch(::stdscr);
}
